050525  3:43:01  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
050525  3:43:01  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 96699568.
InnoDB: Doing recovery: scanned up to log sequence number 0 96702633
050525  3:43:01  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 0, file name 
050525  3:43:02  InnoDB: Started; log sequence number 0 96702633
050525  3:43:02  InnoDB: Starting recovery for XA transactions...
050525  3:43:02  InnoDB: 0 transactions in prepared state after recovery
050525  3:43:02 [Note] ./mysqld: ready for connections.
Version: '5.0.4-beta-debug-log'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Debug (GPL)
050525  3:43:03 [ERROR] ./mysqld: Incorrect key file for table './mysql/proc.MYI'; try to repair it
050525  3:43:04 [ERROR] ./mysqld: Incorrect key file for table './mysql/proc.MYI'; try to repair it
mysqld: item_func.cc:4669: void Item_func_sp::fix_length_and_dec(): Assertion `0' failed.
mysqld got signal 6;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16777216
read_buffer_size=258048
max_used_connections=8
max_connections=100
threads_connected=8
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 92783 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8c4bc40
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbfe3ea98, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80a2cb3
0x838d688
0x8398d61
0x838da19
0x8399180
0x8395919
0x8067f19
0x805e5a7
0x80daf2e
0x80e1a52
0x80e6086
0x80e17f1
0x80b56e6
0x80bbfba
0x80b3b34
0x80b33fc
0x80b26b4
0x838ae3c
0x83b499a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do 
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8ccc9a8 = Select fn5(-1.00E+09)
thd->thread_id=2
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
